NodeList.prototype.forEach = Array.prototype.forEach;
var customer_name__information = document.getElementById('customer_name__information'),
    contacts__information = document.getElementById('contacts__information'),
    region_name__information = document.getElementById('region_name__information'),
    address__information = document.getElementById('address__information'),
    zjl__information = document.getElementById('zjl__information'),
    resource__information = document.getElementById('resource__information'),

    distributor_code__information = document.getElementById('distributor_code__information'),
    distributor_code_tel__information = document.getElementById('distributor_code_tel__information'),
    sales_id__information = document.getElementById('sales_id__information'),
    sales_tel__information = document.getElementById('sales_tel__information'),
    tech_id__information = document.getElementById('tech_id__information'),
    tech_tel__information = document.getElementById('tech_tel__information'),
    installer_code__information = document.getElementById('installer_code__information'),
    installer_code_tel__information = document.getElementById('installer_code_tel__information'),
    installer_id__information = document.getElementById('installer_id__information'),
    installer_tel__information = document.getElementById('installer_tel__information');

var path__information = 'http://pm.ht-home.cn/api/project/getProjectInfoForShare.json?projectId='+window.currentProjectId;
var xhr__information = new XMLHttpRequest();
xhr__information.open('GET', path__information, true);
xhr__information.send();
xhr__information.onreadystatechange = function() {
    if (xhr__information.readyState === 4) {
        if (xhr__information.status === 200) {
            var jsonData = JSON.parse(xhr__information.responseText);
            var data = jsonData.data;

            customer_name__information.innerHTML = typeof (data.customer_name) === 'undefined' ? '' : data.customer_name;
            contacts__information.innerHTML = typeof (data.contacts) === 'undefined' ? '' : data.contacts;
            region_name__information.innerHTML = typeof (data.region_name) === 'undefined' ? '' : data.region_name;
            address__information.innerHTML = typeof (data.address) === 'undefined' ? '' : data.address;
            zjl__information.innerHTML = typeof (data.zjl) === 'undefined' ? '' : data.zjl;
            resource__information.innerHTML = typeof (data.resource) === 'undefined' ? '' : data.resource;

            distributor_code__information.innerHTML = typeof (data.distributor_code) === 'undefined' ? '' : data.distributor_code;
            distributor_code_tel__information.innerHTML = typeof (data.distributor_code_tel) === 'undefined' ? '' : data.distributor_code_tel;
            sales_id__information.innerHTML = typeof (data.sales_id) === 'undefined' ? '' : data.sales_id;
            sales_tel__information.innerHTML = typeof (data.sales_tel) === 'undefined' ? '' : data.sales_tel;
            tech_id__information.innerHTML = typeof (data.tech_id) === 'undefined' ? '' : data.tech_id;
            tech_tel__information.innerHTML = typeof (data.tech_tel) === 'undefined' ? '' : data.tech_tel;
            installer_code__information.innerHTML = typeof (data.installer_code) === 'undefined' ? '' : data.installer_code;
            installer_code_tel__information.innerHTML = typeof (data.installer_code_tel) === 'undefined' ? '' : data.installer_code_tel;
            installer_id__information.innerHTML = typeof (data.installer_id) === 'undefined' ? '' : data.installer_id;
            installer_tel__information.innerHTML = typeof (data.installer_tel) === 'undefined' ? '' : data.installer_tel;


        }
    }
};
